From: Glenn Morris Date: Mon, 11 Feb 2013 00:54:48 +0000 (-0800) Subject: * configure.ac (emacs_config_options): Record some env vars. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~3615^2~840 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=1e8725cfae4c4bc32cff9635b5fc3845ee1d069c;p=emacs.git * configure.ac (emacs_config_options): Record some env vars. --- diff --git a/configure.ac b/configure.ac index 5991f2d9e93..13d8fe7473c 100644 --- a/configure.ac +++ b/configure.ac @@ -23,9 +23,21 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ(2.65) AC_INIT(emacs, 24.3.50) + dnl This is the documented way to record the args passed to configure, dnl rather than $ac_configure_args. emacs_config_options="$@" +## Add some environment variables, if they were passed via the environment +## rather than on the command-line. +for var in CFLAGS CPPFLAGS LDFLAGS; do + case "$emacs_config_options" in + *$var=*) continue ;; + esac + eval val="\$${var}" + test x"$val" = x && continue + emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=$val" +done + AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) AC_CONFIG_AUX_DIR(build-aux)